package pattern.factory.simplefactory;

/**
 * 简单工厂类测试
 *
 * @author zhang peng yang ming
 * @create 2018-07-21 21:54
 */
public class SimpleFactoryClient {
    public static void main(String[] args) {
        Car jeep = SimpleFactory.getCar("jeep");
        Car tesla = SimpleFactory.getCar("tesla");

        jeep.run();
        tesla.run();

        jeep = SimpleStaticFactory.getJeep();
        tesla = SimpleStaticFactory.getTesla();

        jeep.run();
        tesla.run();
    }
}
